{% extends 'base.html' %}

{% block title %}Viewing {{ object.title }}{% endblock title %}

{% block header %}
<a href="?view={{ current.view }}&amp;{% include 'views.include.html' %}" >
<img height="48" style="vertical-align: middle; float: left !important;" src="{{ site.icon }}" alt="Go back to the home page" />
</a>
 <a href="?category={{ category.name }}&amp;view={{ current.view }}&amp;{% include 'views.include.html' %}&amp;page={{ current.page }}">
<img height="48" style="vertical-align: middle;" src="{{ category.icon }}" alt="Category icon" /></a>
 {{ object.title }}
{% endblock header %}

{% block content %}
<table width="100%">

{% block viewcontent %}
<tr>
<td>
{{ object.long_description|safe }}
</td>
</tr>
<tr>
<td>
<br />
<table style="margin-left: auto; margin-right: auto; text-align: center;">

<tbody>
<tr><td colspan="2">
{% block filetypes_info %}
{% endblock filetypes_info %}
</td></tr>
{% if object.types %}
<tr>
<td colspan="2" style="vertical-align: middle;">
<form name="filesbox" action="">
<select name="FileTypes" onchange="location.href=filesbox.FileTypes.options[selectedIndex].value">
<option value="">Choose your {% block filetypes_localisation %}file{% endblock filetypes_localisation %}!</option>
{% for type in object.types %}
<option value="?category={{ category.name }}&amp;object={{ object.name }}&amp;dl=1&amp;type={{ type.0 }}">{{ type.1 }}</option>
{% endfor %}
</select>
</form>
</td>
</tr>
{% endif %}
</tbody>
</table>
{% endblock viewcontent %}

</td>
</tr>
<tr>
<td>
<table style="margin-left: auto; margin-right: auto; text-align: center;">
<tbody>
<tr>
<td colspan="2">
<a style="cursor: pointer;" onclick="history.go(-1)">
<img src="{{ site.httppath }}/Data/images/back.png" alt="Back"/></a></td>
</tr>
</tbody>
</table>

</td>
</tr>
</table>

<table class="table" cellpadding="0" cellspacing="0">
<tr>
<th style="text-align: center;">{{ title }} Preview</th>
</tr>
<tr style="background: none !important;">
<td><img src="{{ object.preview }}" alt="{{ object.title }} preview"></img></td></tr>
</table>
{% endblock content %}